﻿using ConsoleApp.Job.Model.Entities;
using ConsoleApp.Util;
using System.Collections.Generic;

namespace ConsoleApp.Service
{
    public class DistinctService
    {
        private string conn_proapp => AppSettingsConstVars.DbSqlConnection;
        public List<District> GetList()
        {
            //var cmdText = $@"SELECT name AS Name,id AS Id,code AS Code
            //  FROM proapp.district
            //  WHERE 1=1";

            var cmdText = $@"SELECT name AS Name,id AS Id
              FROM t1
              WHERE 1=1";
            DapperHelper_MySql dapperDal = new DapperHelper_MySql(conn_proapp);
            var list = dapperDal.Query<District>(cmdText);
            return list;
        }
    }
}
